/*
package com.ailargemodel.common.rabbitmq;
  
import org.springframework.amqp.core.Binding;  
import org.springframework.amqp.core.BindingBuilder;  
import org.springframework.amqp.core.DirectExchange;  
import org.springframework.amqp.core.Queue;  
import org.springframework.amqp.rabbit.connection.ConnectionFactory;  
import org.springframework.amqp.rabbit.core.RabbitAdmin;  
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;  
import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter;  
import org.springframework.context.annotation.Bean;  
import org.springframework.context.annotation.Configuration;  
  
@Configuration  
public class RabbitMQConfig {  
  
    public static final String QUEUE_NAME = "AI_QUEUE";
    public static final String EXCHANGE_NAME = "AI_EXCHANGE";
    public static final String ROUTING_KEY = "AI_ROUTING_KEY";
  
    @Bean  
    Queue queue() {  
        return new Queue(QUEUE_NAME, true); // true for durable queue  
    }  
  
    @Bean  
    DirectExchange exchange() {  
        return new DirectExchange(EXCHANGE_NAME);  
    }  
  
    @Bean  
    Binding binding(Queue queue, DirectExchange exchange) {  
        return BindingBuilder.bind(queue).to(exchange).with(ROUTING_KEY);
    }  
  
    @Bean  
    SimpleMessageListenerContainer container(ConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) {  
        SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();  
        container.setConnectionFactory(connectionFactory);  
        container.setQueueNames(QUEUE_NAME);  
        container.setMessageListener(listenerAdapter);  
        return container;  
    }  
  
    @Bean  
    MessageListenerAdapter listenerAdapter(MessageConsumer receiver) {  
        return new MessageListenerAdapter(receiver, "receiveMessage");  
    }  
}*/
